package com.spzx.model.vo.Common;

import lombok.Data;

/**
 * @author: jaykim
 * @created: 2023/11/30
 */
@Data
public class Result<T> {
    //返回码
    private Integer code;
    //返回消息
    private String message;
    //业务数据
    private T data;

    //定义返回结果集
    public static<T> Result<T> ok(Integer code, String message, T data) {
        Result<T> result = new Result<>();
        result.setCode(code);
        result.setData(data);
        result.setMessage(message);
        return result;
    }

}
